package com.hxc.basicdata.service.impl;

import java.util.List;
import com.hxc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hxc.basicdata.mapper.TCompanyInfoMapper;
import com.hxc.basicdata.domain.TCompanyInfo;
import com.hxc.basicdata.service.ITCompanyInfoService;

/**
 * 农村企业信息Service业务层处理
 * 
 * @author hxc
 * @date 2021-08-12
 */
@Service
public class TCompanyInfoServiceImpl implements ITCompanyInfoService 
{
    @Autowired
    private TCompanyInfoMapper tCompanyInfoMapper;

    /**
     * 查询农村企业信息
     * 
     * @param id 农村企业信息主键
     * @return 农村企业信息
     */
    @Override
    public TCompanyInfo selectTCompanyInfoById(Long id)
    {
        return tCompanyInfoMapper.selectTCompanyInfoById(id);
    }

    /**
     * 查询农村企业信息列表
     * 
     * @param tCompanyInfo 农村企业信息
     * @return 农村企业信息
     */
    @Override
    public List<TCompanyInfo> selectTCompanyInfoList(TCompanyInfo tCompanyInfo)
    {
        return tCompanyInfoMapper.selectTCompanyInfoList(tCompanyInfo);
    }

    /**
     * 新增农村企业信息
     * 
     * @param tCompanyInfo 农村企业信息
     * @return 结果
     */
    @Override
    public int insertTCompanyInfo(TCompanyInfo tCompanyInfo)
    {
        tCompanyInfo.setCreateTime(DateUtils.getNowDate());
        return tCompanyInfoMapper.insertTCompanyInfo(tCompanyInfo);
    }

    /**
     * 修改农村企业信息
     * 
     * @param tCompanyInfo 农村企业信息
     * @return 结果
     */
    @Override
    public int updateTCompanyInfo(TCompanyInfo tCompanyInfo)
    {
        return tCompanyInfoMapper.updateTCompanyInfo(tCompanyInfo);
    }

    /**
     * 批量删除农村企业信息
     * 
     * @param ids 需要删除的农村企业信息主键
     * @return 结果
     */
    @Override
    public int deleteTCompanyInfoByIds(Long[] ids)
    {
        return tCompanyInfoMapper.deleteTCompanyInfoByIds(ids);
    }

    /**
     * 删除农村企业信息信息
     * 
     * @param id 农村企业信息主键
     * @return 结果
     */
    @Override
    public int deleteTCompanyInfoById(Long id)
    {
        return tCompanyInfoMapper.deleteTCompanyInfoById(id);
    }
}
